﻿@using Askmethat.Aspnet.JsonLocalizer.Localizer
@inject IDataService DataService
@inject IJsonStringLocalizer<ListModel> Localizer
@{
    var blog = await DataService.CustomFields.GetBlogSettings();
}
<header class="header">
    <div class="header__content row">

        <div class="header__logo">
            <a class="logo" href="~/blog">
                <h2 class="blog-header">@blog.Title</h2>
            </a>
        </div>

        <ul class="header__social">
            @foreach (var field in blog.SocialFields)
            {
            <li><a href="@field.Content"><i class="fa @field.Icon" aria-hidden="true"></i></a></li>
            }
            <li><a href="~/feed/rss"><i class="fa fa-rss" aria-hidden="true"></i></a></li>
        </ul>

        <a class="header__search-trigger" href="#0"></a>
        <div class="header__search">
            <form role="search" class="header__search-form" asp-controller="Blog" asp-action="Search" method="post">
                <label>
                    <span class="hide-content">@Localizer["search"]</span>
                    <input type="search" class="search-field" placeholder="Type Keywords" value="" id="term" name="term" title="Search for:" autocomplete="off">
                </label>
                <input type="submit" class="search-submit" value="@Localizer["search"]">
            </form>
            <a href="#0" title="Close Search" class="header__overlay-close">@Localizer["close"]</a>
        </div>

        <a class="header__toggle-menu" href="#0" title="Menu"><span>Menu</span></a>
        <nav class="header__nav-wrap">
            <h2 class="header__nav-heading h6">@Localizer["navigation"]</h2>
            <ul class="header__nav">
                <li><a href="~/" title="">@Localizer["home"]</a></li>
                <li><a href="~/blog" title="">@Localizer["blog"]</a></li>
                <li><a href="~/admin" title="">@Localizer["admin"]</a></li>
            </ul>
            <a href="#0" title="Close Menu" class="header__overlay-close close-mobile-menu">@Localizer["close"]</a>
        </nav>

    </div>
</header>